//
//  DevicePowerView.m
//  sensen_ios
//
//  Created by mc on 16/6/6.
//  Copyright © 2016年 pro. All rights reserved.
//

#import "DevicePowerView.h"
#import "PowerView.h"

@implementation DevicePowerView

- (id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {

        CGFloat width = frame.size.width / 4;
        CGFloat heigth = frame.size.height;
        
        self.floodlightView = [[PowerView alloc] initWithFrame:CGRectMake(0, 0, width, heigth)];
        [self addSubview:_floodlightView];
        
        
        self.waterPumpView = [[PowerView alloc] initWithFrame:CGRectMake(width, 0, width, heigth)];
        [self addSubview:_waterPumpView];
        
        
        self.lampView = [[PowerView alloc] initWithFrame:CGRectMake(width * 2, 0, width, heigth)];
        [self addSubview:_lampView];
        
        self.cyclePumpView = [[PowerView alloc] initWithFrame:CGRectMake(width * 3, 0, width, heigth)];
        [self addSubview:_cyclePumpView];
        for (int i = 1; i < 4; i++) {
            
        UILabel *line = [[UILabel alloc] init];
        line.frame = CGRectMake(width * i, 0, 1, frame.size.height);
        line.backgroundColor = [UIColor whiteColor];
        [self addSubview:line];

        }

    }
    return self;
}
@end
